<?php
class Zend_View_Helper_userBox{
	public $view;

	public function setView($view) {
        $this->_view = $view;
    }

	public function userBox() {
		echo '<div style="width:100%;text-align:center">
				<a href="/">Home</a><br />';
		if(Zend_Auth::getInstance()->hasIdentity()) {
		  //user is logged in
			$userInfo = Zend_Auth::getInstance()->getIdentity();
			echo $userInfo->email . '<br /><a href="/auth/logout">logout</a>';
		} else {
			echo '<a href="/auth/login"><strong>Autentificare</strong></a><br />Nu ai cont? <a href="/users/register">Inscrie-te aici</a>';
		}
		echo "</div>";
	}
}
